// logs.js
let timer = null

Page({
  data: {
    logs: [],
    history: [],
    time: 0,
    verification:'',
    mobile:''
  }, 
  
  async getCode() {
    // console.log(111);
    let time = 60 // 初始数据
    // 倒计时
    timer = setInterval(() => {
      // 停止定时器
      if(--time < 0) return clearInterval(timer)
      this.setData({time}) // 渲染结果
    }, 1000)
   
  }
})

